<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CSS 定位</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        /*
        *   1、固定定位也是脱离了标准文档流，也会覆盖到标准文档流的元素之上
        *   2、left top right bottom
        *   3、fixed 是根据 body 进行定位
        */
        .postion-fixed{
            width: 100%;
            height: 50px;
            background-color: blue;
            position: fixed;
            top: 0;
            bottom: 0;
        }
        
    </style>
</head>
<body>
    
    <div class="postion-fixed">

    </div>
    <div style="height: 800px;background-color: red;">1</div>
    <div style="height: 800px;background-color: red;">2</div>
</body>
</html>